package com.liu.eduservice.client;

import com.liu.commonutils.ReturnResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/*将其他服务器(8003)的维护的方法，调用过来在本服务器(8001)使用
* 服务调用*/



@Component   // 将该方法注册到spring
@FeignClient("service-vod")   //指定调用的服务名，前提要注册到nacos注册中心中
public interface VodClient {

    //根据视频id删除阿里云视频
    @DeleteMapping("/eduvod/video/removeAliyunVideoById/{id}")
    ReturnResult removeAliyunVideoById(@PathVariable("id") String id);


    // 传递几个视频id就需要删除对少个阿里云视频(批量删除视频)
    @DeleteMapping("/eduvod/video/removeBatch")
    ReturnResult removeBatch(@RequestParam("videoIdList") List<String> videoIdList);

}
